﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;

namespace Smart
{
    public class DbDoviz : Tablo
    {

        public int DovizNo { get; set; }
        public string Sembol { get; set; }
        public decimal Kur { get; set; }

        public DbDoviz()
        {
            this.TabloAdi = "TBL_DOVIZ";
        }

        public override IEnumerable<string> BulkImport(DateTime lastupdateDate)
        {
            yield return "İndiriliyor...";
            string[] dt = BackOffice.Get.DovizKurlari(lastupdateDate);
            yield return "indirildi.";
            if (dt != null)
            {
                SqlCeClient.Get.Exec("delete from TBL_DOVIZ");
            }
            foreach (string item in SqlCeClient.Get.importRows(this.TabloAdi, dt))
            {
                yield return item;
            }
            yield return "Tamamlandı";
        }

    }
}
